package Practice02;

public class test5 {
    public static void main(String[] args) {
        int bottle=0;
        int cola=1000;
        int sum=0;

        sum += cola;
        bottle += cola;
        cola = 0;
        do {
            cola = bottle / 3;
            bottle = bottle % 3;
            sum += cola;
            bottle += cola;
            cola = 0;
        }while (cola + bottle >= 3);

        System.out.println("喝下的总数："+sum+"剩余的空瓶数："+bottle);
    }
}
